home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-25 | 3.4 KB | 128 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWFloWin.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
- //
- // FW_CFloatWindow: Wrapper for a floating ODWindow.
- //
- // The creation of a FW_CFloatingWindow works differently from FW_CWindow. Usually in your
- // part Initialize method your directly create the floating windows you need.
- //
- // void CMyPart::Initialize()
- // {
- // ...
- // fPaletteWindow = new FW_CFloatingWindow(....);
- // ...
- // }
- //
- // Floating windows are created hidden. You can call FW_CWindow::Show() or FW_CWindow::Hide() to
- // show/Hide your floating windows. When your part is desactivated/activated, the visible floating windows
- // will be automatically hidden/shown.
- //
- // Floating window have to be deleted in your ReleaseAll method
- //
-
- #ifndef FWFLOWIN_H
- #define FWFLOWIN_H
-
- #ifndef FWTCOLL_H
- #include "FWTColl.h"
- #endif
-
- #ifndef FWWINDOW_H
- #include "FWWindow.h"
- #endif
-
- #ifndef FWBNDSTR_H
- #include "FWBndStr.h"
- #endif
-
- // ----- OpenDoc Includes -----
-
- #ifndef FWODTYPS_H
- #include "FWODTyps.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class ODPart;
- class ODWindowState;
- class FW_CPrivSharedWindow;
- struct FW_SWindowParameters;
- class FW_CPart;
- class FW_CFrame;
- class FW_CPresentation;
-
-
-
- //========================================================================================
- // class FW_CFloatingWindow
- //========================================================================================
-
- class FW_CFloatingWindow : public FW_CWindow
- {
- public:
- FW_DECLARE_CLASS
-
- //----------------------------------------------------------------------------------------
- // Constructors/Destructor
- //
- public:
- FW_CFloatingWindow(Environment* ev,
- FW_CPart* part,
- FW_CPresentation* presentation,
- const FW_CString& windowTitle,
- const FW_CPoint& interiorSize,
- const FW_CPoint& position,
- FW_Boolean hasCloseBox);
-
- virtual ~FW_CFloatingWindow();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual FW_Boolean IsFloating(Environment* ev) const;
-
- virtual ODID GetID(Environment* ev) const;
- virtual void SetID(Environment* ev, ODID windowID);
-
- FW_CPart* GetPart(Environment*) const
- {return fPart;}
-
- virtual ODWindow* AcquireODWindow(Environment* ev) const;
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- static void HideShowFloatingWindows(Environment *ev,
- ODWindowState* windowState,
- FW_Boolean state);
-
- static void TransferOwnership(Environment* ev,
- ODWindowState* windowState,
- ODPart* newOwner);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- FW_CPart* fPart;
- ODTypeToken fPresentation;
- FW_CPrivSharedWindow* fSharedWindow;
- FW_SWindowParameters* fWindowParameters;
- FW_CFrame* fRootFrame;
-
- protected:
- static FW_TOrderedCollection<FW_CPrivSharedWindow>* gSharedWindows;
- };
-
- #endif
-